import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: () => import('@/views/home/index.vue')
    },
    {
      path: '/market',
      name: 'Market',
      component: () => import('../views/market/index.vue')
    },
    {
      path: '/earnInterest',
      name: 'EarnInterest',
      component: () => import('@/views/earnInterest/index.vue')
    },
    // earnInterest子级页面
    {
      path: '/earn',
      name: 'Earn',
      component: () => import('@/views/earnInterest/components/earn.vue')
    },
    {
      path: '/poofStake',
      name: 'PoofStake',
      component: () => import('../views/poofStake/index.vue')
    },
    // poofStake子级页面
    {
      path: '/stake',
      name: 'Stake',
      component: () => import('../views/poofStake/components/stake.vue')
    },
    {
      path: '/user',
      name: 'User',
      component: () => import('../views/user/index.vue')
    },
    // 我的8个页面路由
    {
      path: '/notifications',
      name: 'Notifications',
      component: () => import('@/views/user/components/notifications.vue')
    },
    {
      path: '/invite',
      name: 'Invite',
      component: () => import('../views/user/components/invite.vue')
    },
    {
      path: '/support',
      name: 'Support',
      component: () => import('@/views/user/components/support.vue')
    },
    {
      path: '/faq',
      name: 'Faq',
      component: () => import('../views/user/components/faq.vue')
    },
    {
      path: '/policy',
      name: 'Policy',
      component: () => import('../views/user/components/policy.vue')
    },
    {
      path: '/lang',
      name: 'Lang',
      component: () => import('../views/user/components/lang.vue')
    },
    {
      path: '/wallet',
      name: 'Wallet',
      component: () => import('../views/user/components/wallet.vue')
    },
    {
      path: '/loan',
      name: 'Loan',
      component: () => import('../views/user/components/loan.vue')
    },
    {
      path: '/records',
      name: 'Records',
      component: () => import('../views/user/components/records.vue')
    },

  ]
})

export default router
